package top.superflow.context.api

import java.io.File

import top.superflow.verify.Check

trait ContextConfig extends Check{
    
  def getConfig : Any = {
    val customHome = this.getCustomHome 
    val customConfig = customHome + "/" + getConfigFileName
    if (isFileExist(customConfig)){
      new File(customConfig)
    }else{
      getDefaultConfig
    }
  }
  
  def getCustomHome : String
  
  def getConfigFileName : String
  
  def getDefaultConfig : String
}